//
//  KRColumnView.m
//  cookBook
//
//  Created by kuroken on 16/1/13.
//  Copyright © 2016年 kuroken. All rights reserved.
//

#import "KRColumnView.h"
#import "KRConst.h"

/** 栏目标题的高度 */
NSUInteger const KRColumnViewHeight = 62;

@interface KRColumnView ()
@property (weak, nonatomic) IBOutlet UIButton *columnTitleBtn;
/** 栏目类型 */
@property (nonatomic, assign) KRColumnType type;
- (IBAction)columnMoreBtnClick;
@end

@implementation KRColumnView

- (instancetype)init
{
    return [[[NSBundle mainBundle] loadNibNamed:@"KRColumnView" owner:nil options:nil] lastObject];
}

- (void)setTitle:(NSString *)columnTitle
{
    [self.columnTitleBtn setTitle:columnTitle forState:UIControlStateNormal];
}

- (void)setColumnType:(KRColumnType)type
{
    self.type = type;
}

- (IBAction)columnMoreBtnClick {

    if ([self.delegate respondsToSelector:@selector(columnView:columnType:)]) {
        [self.delegate columnView:self columnType:self.type];
    }
}
@end
